package com.ming.controller;

import com.ming.domain.Book;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/books")
public class BookController {
    @GetMapping("/getById")
    public String getById(){
        System.out.println("getById");
        return "getById";
    }

    @GetMapping("/getById2")
    public Book getById2(){
        Book book = new Book();
        book.setId(1);
        book.setName("aa");
        book.setType("1");
        book.setDescribe("sdfsdfa");
        return book;
    }


}
